<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>动态添加删除行</title>

    <script src="__JS__/jquery.min.js"></script>
    <link href="__CSS__/query_style.css" rel="stylesheet" type="text/css">

    <style type="text/css">
        .yellow3-int{ background: #2a57a6; color: #fff; padding: 6px 20px; border: none; border-radius: 8px; font-size: 10px;}
        .yellow4-int{ background: #2a57a6; color: #fff; padding: 6px 20px; border: none; border-radius: 8px; font-size: 10px;}

    </style>
    <script type="text/javascript">




        function update() {
            var mail=$("input[name='mail']").val();
            var deployName=$("input[name='deployName']").val();
            var sex=$("input[name='sex']").val();
            var id=$("input[name='id']").val();


            $.ajax({
                type: "POST",
                url: "/User/Admin/doUpdateUser",
                data: {"mail":mail,"deployName":deployName,"sex":sex,"id":id},
                success: function(result){
                    alert(result.message);
                    if(result.status=='success'){
                        window.location.href="/User/Admin/query?loginName="+result.name;
                    }
                },

                error(e){
                    console.log(e);
                   alert("系统异常!");
                },


            });
        }
    </script>

</head>
<body>
<!-- top -->
<div id="xt-top">
    <div class="xt-logo"><img src="_IMAGE/logo.png"/></div>
    <div class="xt-geren">
        <div class="xt-exit"><span class="xt-span">您好!
            <?php echo $loginVo->getDeployName();?>  ，欢迎您登录管理中心</span><a href="#" class="help">帮助</a>
            <a href="#" class="exit">退出</a></div>
    </div>
</div>

<div style="width:720px;margin:20px auto;">


    <span style="text-align:center; padding-bottom: 6px;  color: #0000ff;font-size: 20px;
          padding-top: 6px;display:block">修改用户信息</span>
    <br/>
    <br/>
    <br/>

    <table id="dynamicTable" width="700" border="0" cellspacing="0" cellpadding="0">
        <thead>
        <tr height="29px">
            <td align="center" bgcolor="#CCCCCC">登录名</td>
            <td align="center" bgcolor="#CCCCCC">邮箱</td>
            <td align="center" bgcolor="#CCCCCC">展示名</td>
            <td align="center" bgcolor="#CCCCCC">性别</td>

        </tr>
        </thead>
        <tbody>
        <tr height="29px">
            <input type="hidden" name="id"  value="{$id}"/></td>

            <td align="center" height="18px" >
                {$user.name}</td>
            <td align="center" height="18px">
                <input type="text" name="mail"  value="{$user.mail}"/></td>
            <td align="center" height="18px">
                <input type="text" name="deployName"  value="{$user.deploy_name}"/></td>
            <td align="center" height="18px">
                <input type="text" name="sex"

                <?php if($sex == '2'): ?>
                value='女'
                <?php elseif($sex == '1') : ?>
                 value='男'
                <?php else : ?>
                    value='未确定'
                <?php endif ?>
                "/> </td>

        </tr>
        </tbody>
    </table>
    <br/>
    <br/>

    <input type="button" id="Button3" onClick="update()"  class="yellow3-int" value="保存">


</div>

</body>
</html>
